Foundation | Welcome


The CNY70

The CNY70 reflective optical sensors that comprise the line detector's three member array connect to one input each of three comparators. The comparators will share a second leg with sets a reference voltage on which they can output a 3.3V that are polled by the MSP430 on three separate ports. When a CNY70 sensor is situated over a white surface, the voltage seen by a comparator from the transistor and over a resistor triggers the comparator and grounds a port in the MSP430 that has been pulled high by an internal resistor. The reference voltage by which the comparators trigger is modifiable through a shared pot.

How line navigation logic works

A three member array will be defined in the code that will represent the status of each CNY70 sensor. The digital conversion by the comparators yield a binary 1 or 0, where 0 corresponds to the CNY70 sensor being situated over a black surface and a 1 corresponding to the CNY70 being situated over a white surface. The previously defined array will be loaded with the values for each sensor in order, with a sample value being 010, representing the line being situated at the exact center of the CNY70 sensor array. What will follow is an algorithm applied to each array, with the array value updating upon completion of the algorithm.

Whenever the center comparator is 1 and both left and right comparators are 0, both motors will turn on. The status of the left and right comparators are trigged on through an interrupt routine that immediately alternates right and left motors respectively, and if both left and right comparators have been triggered, the rover will come to a complete stop and the navigational microcontroller will report to the master upon being polled that it has reached the end stop of the line. It is important to note that the left and right motor separate enables are sometimes called even when the center comparator is high; this is by design and allows for sharper turns on the track.

Drive motors

In order to navigate to the fire, two PGHM-02 drive motors were chosen for their high torque values of 388.85 oz/in while still running at 12 V. Although the high torque came at a lowered speed of only 65 RPM, the lower speed was actually helpful as it reduced the acceleration’s effect on the carried water. If HeatSeekr moved too quickly, the sudden changes in speed at start and finish would cause the water to fluctuate greatly and cause excessive weight distribution and unbalance. To drive the PGHM-02 drive motors, a Texas Instruments L293DNE was used to control both motors.